package com.umakr.ax.app.web;

import com.umakr.ax.common.enm.AttentionFrom;
import com.umakr.ax.common.service.RadioStationFollowerService;
import com.umakr.ax.core.base.AbstractController;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 * 电台粉丝  前端控制器
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
@Controller
@RequestMapping("/api/radioStationFollower")
public class RadioStationFollowerAppController extends AbstractController {
	@Autowired
	RadioStationFollowerService stationFollowerService;

	@ApiOperation(value = "电台关注/取消关注")
	@GetMapping("/changeAttention")
	public Object changeAttention(ModelMap modelMap, Long userId , Long rsId , Integer attention , Integer attentionFrom) {
		return setSuccessModelMap(modelMap,stationFollowerService.changeAttention(userId,rsId,attention,attentionFrom));
	}
	@ApiOperation(value = "测试自动关注")
	@GetMapping("/testAutoAttention")
	public Object testAutoAttention(ModelMap modelMap, Long userId,Long rsId,AttentionFrom attFrom) {
		return setSuccessModelMap(modelMap,stationFollowerService.autoAttention(userId,rsId,attFrom));
	}

}